<extend name="Base/common"/>
<block name="Content">
   
        <div class="am-cf am-padding-top">
            <div class="am-fl am-cf">
                <i class="am-icon-file"></i>
                <strong class="am-text-primary am-text-lg">用户管理</strong>
            </div>
            <hr data-am-widget="divider"  class="am-divider am-divider-default" />
        </div>

            <div class="am-u-sm-12 am-u-md-6"  style="padding:0px">
                <div class="am-btn-toolbar">
                    <div class="am-btn-group am-btn-group-xs">
                        <a type="button" class="am-btn am-btn-success" href="{:U('editAction')}"><span class="am-icon-plus"></span>&nbsp;新增</a>
                        <button type="button" class="am-btn  am-btn-warning ajax-post confirm" url="{:U('del')}" target-form="ck">
                            <span class="am-icon-trash-o"></span>
                            删除
                        </button>
                    </div>
                </div>
            </div>
            <div class="am-fr am-padding-right am-u-md-3">
            	<form class="am-form" action="{:U('index')}" method="post">
                <div class="am-input-group am-input-group-sm">
                    <input type="text" class="am-form-field am-input-sm" placeholder="用户名称" name='adminName' value="{$adminName}"/><span class="am-input-group-btn">
                        <button class="am-btn am-btn-default" type="submit">
                            搜索
                        </button>
                    </span>
                </div>
			</form>
            </div>
   
        <table class="am-table am-table-striped am-table-hover table-main">
            <thead>
                <tr>
                    <th class="table-check am-text-left">
                        <input type="checkbox" class="checkAll"/>
                    </th>
					 <th class="table-title am-text-left" style="width:20%">
                        用户账号 
                    </th>
                   
                    <th class="table-set am-text-left" style="width:20%">
                        真实姓名
                    </th>
                    <th class="table-set am-text-left" style="width:30%">
                        角色
                    </th>
                    <th class="table-set am-text-left" style="width:20%">
                        操作
                    </th>
                </tr>
            </thead>
            <tbody>
                <notempty name="adminList">
                    <foreach name="adminList" item="admin">
                        <tr>
                            <td>
                                <input type="checkbox" value="{$admin.admin_id}" name="admin_ids[]" class="ck"/>
                            </td>
							<td>
                                {$admin.admin_account}
                            </td>
                            <td>
                                {$admin.admin_name}
                            </td>
                            <td>
                                {:($roleList[$admin['role_id']])}
                            </td>
                            <td>
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <a class="am-btn am-btn-default am-btn-xs am-text-secondary" href="{:U('editAction?admin_id='.$admin['admin_id'])}"><span class="am-icon-pencil-square-o"></span>编辑</a>
                                        <a class="am-btn am-btn-default am-btn-xs am-text-success ajax-get confirm " href="{:U('del?admin_ids='.$admin['admin_id'])}"><span class="am-icon-trash-o"></span>删除</a>
                                        <a class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only ajax-get" href="{:U('init_pwd?admin_id='.$admin['admin_id'])}"><span class="am-icon-github"></span>密码初始化</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </foreach>
                    <else/>
                    <td colspan="6" class="text-center">
                        aOh! 暂时还没有内容! 
                    </td>
                </notempty>
            </tbody>
        </table>
        <!-- 分页 -->
        <ul class="am-pagination am-pagination-default am-no-layout amz-social">
            {$_page}
        </ul>
  
    <block name="style">
        <style type="text/css">
            .am-table {
                padding-left: 0px;
                margin-left: 0px
            }
        </style>
    </block>
